﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Model;
using Controller;

namespace Facade.Validator
{
    public class KPIAssignDetailValidator
    {
        public string ValidateOnSave(KPIAssignDetail KPIs)
        {
            string msg = "OK";
            if (KPIs.KPI == null)
                msg = "Please Enter KPI";
            if (KPIs.KPIAssign == null)
                msg = "Please Enter KPI Assign";
            if (KPIs.Employee == null)
                msg = "Please Enter Employee to be Assigned";
            if (KPIs.UoM == null)
                msg = "Please Enter UoM KPI";
            return msg;
        }

        public string ValidateOnUpdate(KPIAssignDetail KPIs)
        {
            string msg = "OK";
            if (KPIs.KPI == null)
                msg = "Please Enter KPI";
            if (KPIs.KPIAssign == null)
                msg = "Please Enter KPI Assign";
            if (KPIs.Employee == null)
                msg = "Please Enter Employee to be Assigned";
            if (KPIs.UoM == null)
                msg = "Please Enter UoM KPI";
            return msg;
        }
    }
}